import request from '@/utils/request'

// app列表查询
export function fetchList() {
    return request({
      url:'/job/queryList',
      method:'get'
    })
}

// 新增任务
export function addJob(data) {
    return request({
        url:'/job/addJob',
        method:'post',
        data: data
    })
}

// 修改任务状态
export function changeJobStatus(id) {
    return request({
        url:'/job/changeState/' + id,
        method:'post'
    })
}


// 修改任务cron表达式
export function changeJobCron(id, params) {
    return request({
        url:'/job/reScheduleJob/' + id,
        method: 'post',
        params: params
    })
}


// 删除任务
export function deleteJob(id) {
    return request({
        url:'/job/deleteJob/' + id,
        method:'post'
    })
}